Check that non-native window are indeed children of the event window and
only then confirm that they should be drawn.
Fixes Glade thinking that it's okay to have the draw function do
different things depending on what window to draw. (This should really
be fixed in Glade.)
g_return_val_if_fail (cr != NULL, FALSE);
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
- if (!gdk_window_has_native (window))
+ event_window = gtk_cairo_get_event_window (cr);
+
+ if (event_window == NULL)
return TRUE;
- event_window = gtk_cairo_get_event_window (cr);
+ while (!gdk_window_has_native (window))
+ window = gdk_window_get_parent (window);
- return event_window == NULL ||
- event_window == window;
+ return event_window == window;
}
void